package org.lemon.db.tx;

import org.lemon.db.store.BlockId;

/**
 * @since 2024-12-13 10:42
 */
public interface Transaction {
    
    void commit();
    void rollBack();
    void recover();
    void pin(BlockId blockId);
    void unPin(BlockId blockId);
    long getLong(BlockId blockId, int offset);
    String getString(BlockId blockId, int offset);
    void setLong(BlockId blockId, int offset, long val, boolean flushed);

    void setInt(BlockId blockId, int offset, int val, boolean flushed);
    void setString(BlockId blockId, int offset, String s, boolean flushed);
    int availableBuffers() ;
    int size(String fileName);
    BlockId append(String fileName) ;
    int blockSize();
}
